package com.zytool.easyrestful.demo.service;

import com.zytool.easyrestful.core.GenericService;
import com.zytool.easyrestful.demo.entity.UserEntity;
import com.zytool.easyrestful.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService extends GenericService<UserEntity> {

    private UserMapper userMapper;

    @Autowired
    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
        super.setGenericMapper(userMapper);
    }

    public UserEntity getUserById(int id) {
        return userMapper.getUserById(id);
    }
}
